package com.tencent.sr.iris.basic.mp.dependency.activity;

import com.tencent.sr.iris.activity.interfaces.client.activity.ActivityConfigClient;
import com.tencent.sr.iris.activity.interfaces.request.acticity.GetActivityConfigAwardRequest;
import com.tencent.sr.iris.activity.interfaces.response.activity.ActivityAwardInfoResponse;
import com.tencent.sr.iris.basic.mp.common.util.HttpUtils;
import com.tencent.sr.rmall.common.primitive.HttpResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;


@Component
@Slf4j
public class ActivityConfigDependency {

    @Resource
    private ActivityConfigClient activityConfigClient;

    /**
     * 查询活动奖励配置金额
     * @param request
     * @return
     */
    public ActivityAwardInfoResponse getConfigAwardInfo(GetActivityConfigAwardRequest request) {
        HttpResult<ActivityAwardInfoResponse> result = activityConfigClient.getConfigAwardInfo(request);
        return HttpUtils.handleError(result);
    }
}
